/* 场景编辑器 - 资源面板样式 */

#geometry-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.3);  /* 半透明背景 */
    backdrop-filter: blur(10px);  /* 背景模糊 */
    color: white;
    padding: 0;
    border-radius: 10px;
    width: 280px;
    max-height: 80vh;
    overflow: hidden;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ===============================================
   Mesh结构树面板样式
   =============================================== */

.mesh-structure-panel {
    position: fixed;
    top: 50%;
    left: -500px; /* 默认移出屏幕外（改为从左侧） */
    transform: translateY(-50%);
    width: 400px;
    max-height: 85vh;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: -9999; /* 隐藏时放到最底层 */
    display: none !important; /* 强制不显示 */
    flex-direction: column;
    overflow: hidden;
    visibility: hidden !important; /* 强制隐藏 */
    opacity: 0;
    pointer-events: none !important; /* 完全不可点击 */
    transition: left 0.3s ease-out, opacity 0.3s ease-out;
}

/* Mesh面板激活时，贴着左侧面板显示 */
.mesh-structure-panel.active {
    display: flex !important; /* 强制显示 */
    left: 360px; /* 左侧tab(40px) + 间距(10px) + 面板(300px) + 间距(10px) = 360px */
    visibility: visible !important; /* 强制可见 */
    opacity: 1;
    pointer-events: auto !important; /* 可点击 */
    z-index: 9999; /* 提升到顶层 */
    transition: left 0.3s ease-out; /* 添加平滑过渡动画 */
}

/* 当左侧面板隐藏时，Mesh面板左移补位 */
.mesh-structure-panel.active.left-panel-hidden {
    left: 50px !important; /* 只保留左侧tab按钮(40px) + 间距(10px) = 50px */
}

/* 确保面板内所有元素在面板隐藏时也不可点击 */
.mesh-structure-panel:not(.active) * {
    pointer-events: none !important;
    visibility: hidden !important;
}

/* 面板显示时，子元素恢复正常交互 */
.mesh-structure-panel.active * {
    pointer-events: auto;
    visibility: visible;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.mesh-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(102, 126, 234, 0.1);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    flex-shrink: 0;
}

.mesh-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.mesh-panel-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mesh-panel-close:hover {
    background: rgba(255, 100, 100, 0.3);
    color: white;
    transform: rotate(90deg);
}

.mesh-tree-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
}

.mesh-tree-container::-webkit-scrollbar {
    width: 6px;
}

.mesh-tree-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.mesh-tree-container::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.mesh-tree-container::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.mesh-tree-node {
    margin: 3px 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.mesh-tree-node.mesh-selectable {
    cursor: pointer;
}

.mesh-tree-node.mesh-selectable:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateX(2px);
}

.mesh-tree-node.mesh-selectable.selected {
    background: rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.mesh-tree-node:not(.mesh-selectable) {
    opacity: 0.6;
    cursor: default;
}

.mesh-node-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mesh-node-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.mesh-node-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mesh-node-type {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.mesh-node-info {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.mesh-node-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mesh按钮样式 */
.tree-node-action-btn.tree-node-mesh {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.tree-node-action-btn.tree-node-mesh:hover {
    background: rgba(102, 126, 234, 0.35);
    border-color: rgba(102, 126, 234, 0.5);
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .mesh-structure-panel.active {
        left: 320px;
        width: 350px;
    }
    
    .mesh-structure-panel.active.left-panel-hidden {
        left: 50px !important;
    }
}

@media (max-width: 768px) {
    .mesh-structure-panel.active {
        left: 10px;
        width: auto;
        max-height: 70vh;
    }
    
    .mesh-structure-panel.active.left-panel-hidden {
        left: 10px !important;
    }
}

/* Tab 导航栏 */
.panel-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.tab-btn.active {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
    border-bottom-color: #FF9800;
}

/* Tab 内容区域 */
.panel-content {
    padding: 20px;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb {
    background: rgba(255, 152, 0, 0.5);
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 152, 0, 0.7);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* 资源列表 */
.resource-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 资源项（几何体/模型） */
.resource-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: grab;
    transition: all 0.3s;
    user-select: none;
}

.resource-item:hover {
    background: rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 152, 0, 0.4);
    transform: translateY(-2px) scale(1.02); /* 改为向上移动并稍微放大，避免左移被裁切 */
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.resource-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.resource-icon {
    font-size: 20px;
    margin-right: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    flex-shrink: 0;
}

.resource-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.resource-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 🎯 模型文件大小显示 */
.model-size {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
    font-weight: 400;
}

/* 模型筛选区域 */
.model-filter-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.model-search-box {
    position: relative;
    margin-bottom: 10px;
}

.model-search-box input {
    width: 100%;
    padding: 8px 30px 8px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ffffff;
    font-size: 12px;
    transition: all 0.3s;
}

.model-search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(102, 126, 234, 0.5);
}

.model-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-clear-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: none;
}

.search-clear-btn.visible {
    display: block;
}

.search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* 标签筛选 */
.model-tags-filter {
    margin-top: 10px;
}

.tags-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tags-filter-title {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.clear-filter-btn {
    background: none;
    border: none;
    color: rgba(102, 126, 234, 0.8);
    cursor: pointer;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s;
}

.clear-filter-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    color: rgba(102, 126, 234, 1);
}

.tags-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
    padding: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.tags-filter-list::-webkit-scrollbar {
    width: 4px;
}

.tags-filter-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.tags-filter-list::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 2px;
}

.tags-filter-list::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.tag-filter-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.tag-filter-item:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    color: #ffffff;
}

.tag-filter-item.active {
    background: rgba(102, 126, 234, 0.4);
    border-color: rgba(102, 126, 234, 0.8);
    color: #ffffff;
    font-weight: 500;
}

.tag-filter-item .tag-count {
    margin-left: 4px;
    opacity: 0.6;
    font-size: 10px;
}

.tags-filter-list-empty {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    text-align: center;
    padding: 10px;
}

/* 模型项标签显示 */
.model-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 0;
}

.model-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.model-tag:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.25));
    border-color: rgba(102, 126, 234, 0.5);
    color: rgba(255, 255, 255, 1);
}

/* 右键菜单 */
.model-context-menu {
    position: fixed;
    z-index: 10000;
    min-width: 150px;
}

.context-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    transition: all 0.2s;
    border-radius: 4px;
}

.context-menu-item:hover {
    background: rgba(102, 126, 234, 0.3);
    color: #ffffff;
}

/* 面板信息 */
.panel-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* ============================================
   屏幕比例尺指示器 - 扁平简洁样式
   ============================================ */

.screen-scale-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: 'Arial', sans-serif;
    pointer-events: none;
}

.screen-scale-indicator .scale-line {
    width: 100px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.screen-scale-indicator .scale-line::before,
.screen-scale-indicator .scale-line::after {
    content: '';
    position: absolute;
    top: -4px;
    width: 2px;
    height: 10px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.screen-scale-indicator .scale-line::before {
    left: 0;
}

.screen-scale-indicator .scale-line::after {
    right: 0;
}

.screen-scale-indicator .scale-label {
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 8px;
    border-radius: 3px;
}

/* ============================================
   场景树面板样式
   ============================================ */

/* 场景树面板定位 */
#scene-tree-panel.left-panel {
    left: 20px;
    right: auto;
}

#model-library-panel.right-panel {
    right: 20px;
    left: auto;
}

.side-panel.left-panel,
.side-panel.right-panel {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    max-height: calc(100vh - 120px);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* ============================================
   左侧Tab栏 + 面板布局
   ============================================ */

/* 左侧竖向Tab栏 - 独立于面板，始终可见 */
.left-tabs-bar {
    position: fixed;
    left: 5px; /* 贴近边缘 */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px; /* 进一步减少间距 */
    z-index: 1001; /* 高于面板，确保始终在最上层 */
    flex-shrink: 0;
}

/* 左侧面板包装器 - 不包含tab按钮 */
.left-panel-wrapper {
    position: fixed;
    left: 50px; /* 调整为按钮栏宽40px + 间距10px */
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.left-panel-wrapper.hidden {
    transform: translateY(-50%) translateX(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: -1;
}

.left-panel-wrapper.hidden * {
    pointer-events: none !important;
    visibility: hidden !important;
}

.left-vertical-tab-btn {
    width: 40px; /* 进一步减小宽度 */
    min-height: 38px; /* 进一步减小高度 */
    padding: 4px 3px; /* 进一步减小内边距 */
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px; /* 进一步减小圆角 */
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.left-vertical-tab-btn:hover {
    background: rgba(30, 30, 50, 0.98);
    border-color: rgba(102, 126, 234, 0.5);
    color: white;
    transform: translateX(3px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.left-vertical-tab-btn.active {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.8);
    color: white;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.4);
}

.left-vertical-tab-btn .tab-icon {
    display: none; /* 隐藏图标 */
}

.left-vertical-tab-btn .tab-label {
    font-size: 10px; /* 减小字体 */
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    word-break: keep-all;
}

/* 左侧面板内容区 */
.left-tab-content {
    display: none;
    flex-direction: column;
    height: 100%;
}

.left-tab-content.active {
    display: flex;
}

/* 场景面板 - 更高的总高度 */
#scene-panel.left-panel {
    left: auto;
    height: 75vh;
    max-height: calc(100vh - 120px);
    transition: none;
}

/* 移除旧的隐藏样式（现在由wrapper控制） */
#scene-panel.left-panel.hidden {
    /* 由wrapper控制 */
}

#scene-panel.left-panel.hidden * {
    /* 由wrapper控制 */
}

/* 面板切换按钮样式已移除（不再需要） */

/* Tab栏样式 */
.side-panel .panel-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 6px;
    gap: 3px;
}

.side-panel .panel-tabs .tab-btn {
    flex: initial;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.side-panel .panel-tabs .tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.side-panel .panel-tabs .tab-btn.active {
    background: rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.6);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

/* Tab内容 */
.side-panel .tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
    flex-direction: column;
}

.side-panel .tab-content.active {
    display: flex;
}

/* 层级树Tab头部 - 更紧凑，无标题 */
#scene-tree-tab .panel-header {
    padding: 6px 8px;
    min-height: auto;
    display: flex;
    justify-content: space-between; /* 多选计数在左，操作按钮在右 */
    align-items: center;
}

/* 环境Tab头部 */
#environment-tab .panel-header {
    padding: 10px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#environment-tab .panel-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

/* 面板头部 */
.side-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.side-panel .panel-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.side-panel .panel-header-actions {
    display: flex;
    gap: 4px;
}

.side-panel .icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-panel .icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.side-panel .icon-btn:active {
    transform: scale(0.95);
}

/* 面板内容区 */
.side-panel .panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.side-panel .panel-body::-webkit-scrollbar {
    width: 6px;
}

.side-panel .panel-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.side-panel .panel-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.side-panel .panel-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 树容器 */
.tree-container {
    min-height: 200px;
}

.tree-loading {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* 树节点 */
.tree-node {
    user-select: none;
    margin: 0;
    padding: 0;
}

.tree-node-content {
    display: flex;
    align-items: center;
    padding: 3px 6px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.15s, box-shadow 0.15s, transform 0.15s;
    position: relative;
    min-height: 26px;
    /* 确保元素占满宽度，没有空隙 */
    width: 100%;
    box-sizing: border-box;
}

.tree-node-content:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tree-node-content.selected {
    background: rgba(33, 150, 243, 0.3);
    border-left: 3px solid #2196F3;
    padding-left: 4px;
    box-shadow: inset 0 0 0 1px rgba(33, 150, 243, 0.3);
}

.tree-node-content.dragging {
    opacity: 0.5;
}

/* 节点展开/折叠按钮 */
.tree-node-toggle {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    cursor: pointer;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.tree-node-toggle:hover {
    color: rgba(255, 255, 255, 0.9);
}

.tree-node-toggle.expanded {
    transform: rotate(90deg);
}

.tree-node-toggle.empty {
    visibility: hidden;
}

/* 节点图标 - 隐藏 */
.tree-node-icon {
    display: none;
}

/* 节点名称 */
.tree-node-name {
    flex: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* 节点操作按钮 */
.tree-node-actions {
    display: none;
    gap: 2px;
    margin-left: 4px;
}

.tree-node-content:hover .tree-node-actions {
    display: flex;
}

.tree-node-action-btn {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.tree-node-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 重命名按钮特殊样式 */
.tree-node-rename:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

/* 节点可见性图标 */
.tree-node-visible {
    color: rgba(255, 255, 255, 0.5);
}

.tree-node-content.visible .tree-node-visible {
    color: #4CAF50;
}

/* 节点锁定图标 */
.tree-node-locked {
    color: #FF9800;
}

/* 子节点容器 - 减少缩进，适配深层级 */
.tree-node-children {
    margin-left: 6px;
    display: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 2px;
}

.tree-node-children.expanded {
    display: block;
}

/* 拖拽占位符 */
.tree-drag-placeholder {
    height: 3px;
    background: linear-gradient(90deg, #2196F3, #03A9F4);
    margin: 4px 0;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.6);
    animation: pulse 0.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* 拖拽时的光标样式 */
.tree-node-content[draggable="true"] {
    cursor: grab;
}

.tree-node-content.dragging {
    opacity: 0.4;
    cursor: grabbing;
    background: rgba(33, 150, 243, 0.15);
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.5);
}

/* 拖拽目标高亮 - 更明显的效果 */
.tree-node-content.drag-over {
    background: rgba(33, 150, 243, 0.4);
    border-left: 4px solid #2196F3;
    border-right: 4px solid #2196F3;
    padding-left: 3px;
    padding-right: 3px;
    box-shadow: 
        0 0 0 2px rgba(33, 150, 243, 0.3),
        0 0 10px rgba(33, 150, 243, 0.5),
        inset 0 0 20px rgba(33, 150, 243, 0.2);
    transform: scale(1.02);
    animation: pulse-drag-target 0.6s ease-in-out infinite;
}

/* 模型拖拽到节点的高亮提示 */
.tree-node-content.model-drop-target {
    background: rgba(76, 175, 80, 0.3);
    border: 2px dashed #4CAF50;
    padding: 1px 4px;
    box-shadow: 
        0 0 0 2px rgba(76, 175, 80, 0.4),
        0 0 10px rgba(76, 175, 80, 0.6),
        inset 0 0 20px rgba(76, 175, 80, 0.2);
    transform: scale(1.02);
    animation: pulse-green 0.8s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 
            0 0 0 2px rgba(76, 175, 80, 0.4),
            0 0 10px rgba(76, 175, 80, 0.6),
            inset 0 0 20px rgba(76, 175, 80, 0.2);
    }
    50% {
        box-shadow: 
            0 0 0 3px rgba(76, 175, 80, 0.6),
            0 0 15px rgba(76, 175, 80, 0.8),
            inset 0 0 25px rgba(76, 175, 80, 0.3);
    }
}

@keyframes pulse-drag-target {
    0%, 100% {
        box-shadow: 
            0 0 0 2px rgba(33, 150, 243, 0.3),
            0 0 10px rgba(33, 150, 243, 0.5),
            inset 0 0 20px rgba(33, 150, 243, 0.2);
    }
    50% {
        box-shadow: 
            0 0 0 3px rgba(33, 150, 243, 0.5),
            0 0 15px rgba(33, 150, 243, 0.7),
            inset 0 0 25px rgba(33, 150, 243, 0.3);
    }
}

/* 添加子节点按钮样式 */
.tree-node-add-child {
    color: #4CAF50;
}

.tree-node-add-child:hover {
    background: rgba(76, 175, 80, 0.2) !important;
    color: #66BB6A;
}

/* 空树提示 */
.tree-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.tree-empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.3;
}

/* 节点类型图标映射 */
.tree-node-icon[data-type="root"]::before { content: "⬤"; }
.tree-node-icon[data-type="group"]::before { content: "●"; }
.tree-node-icon[data-type="model"]::before { content: "▪"; }
.tree-node-icon[data-type="mesh"]::before { content: "▪"; }
.tree-node-icon[data-type="light"]::before { content: "◆"; }
.tree-node-icon[data-type="camera"]::before { content: "◉"; }
.tree-node-icon[data-type="empty"]::before { content: "○"; }

/* ============================================
   环境设置界面样式
   ============================================ */

.environment-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 环境设置区块 */
.env-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.env-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.2s;
}

.env-section-header:hover {
    background: rgba(255, 255, 255, 0.08);
}

.env-icon {
    font-size: 16px;
    margin-right: 8px;
}

.env-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.env-section-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 环境设置项 */
.env-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.env-item label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
    min-width: 80px;
}

.env-input {
    flex: 1;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    font-size: 12px;
    transition: all 0.2s;
}

.env-input:focus {
    outline: none;
    border-color: #2196F3;
    background: rgba(0, 0, 0, 0.4);
}

.env-input:readonly {
    opacity: 0.6;
    cursor: not-allowed;
}

.env-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.env-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
    transition: all 0.2s;
}

.env-slider::-webkit-slider-thumb:hover {
    background: #42A5F5;
    transform: scale(1.1);
}

.env-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.env-slider::-moz-range-thumb:hover {
    background: #42A5F5;
    transform: scale(1.1);
}

.env-value {
    font-size: 12px;
    color: #2196F3;
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

.env-color {
    width: 50px;
    height: 30px;
    padding: 2px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.env-color:hover {
    border-color: #2196F3;
}

.env-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2196F3;
}

.env-unit {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 4px;
}

.env-btn {
    width: 100%;
    padding: 8px 12px;
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid rgba(33, 150, 243, 0.4);
    border-radius: 6px;
    color: #2196F3;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.env-btn:hover {
    background: rgba(33, 150, 243, 0.3);
    border-color: #2196F3;
    color: #42A5F5;
    transform: translateY(-1px);
}

.env-btn:active {
    transform: translateY(0);
}

/* 环境设置操作按钮组 */
.env-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.env-btn-secondary {
    background: rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 152, 0, 0.4);
    color: #FF9800;
}

.env-btn-secondary:hover {
    background: rgba(255, 152, 0, 0.3);
    border-color: #FF9800;
    color: #FFB74D;
}

/* ============================================
   自定义模态对话框
   ============================================ */

.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    width: auto; /* 改为自动宽度，让内容决定宽度 */
    min-width: 400px; /* 设置最小宽度 */
    max-width: 90vw; /* 使用视口宽度，适应不同屏幕 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header-icon {
    font-size: 20px;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.modal-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.modal-input:focus {
    border-color: #2196F3;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.modal-btn-primary {
    background: #2196F3;
    color: white;
}

.modal-btn-primary:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.modal-btn-danger {
    background: #f44336;
    color: white;
}

.modal-btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.modal-btn-warning {
    background: #ff9800;
    color: white;
}

.modal-btn-warning:hover {
    background: #f57c00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-btn:active {
    transform: translateY(0);
}

/* 演示模式相关样式 - 已移除 */

/* Transform控制面板样式 */
.transform-panel {
    position: fixed;
    right: 390px; /* 模型库面板宽350px + 间距40px */
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 800;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateY(-50%) translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }
}

.transform-header {
    padding: 16px 20px;
    background: rgba(100, 100, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.transform-title {
    font-weight: 600;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.transform-node-name {
    font-size: 12px;
    color: rgba(100, 150, 255, 0.9);
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transform-body {
    padding: 16px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.transform-body::-webkit-scrollbar {
    width: 6px;
}

.transform-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.transform-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.transform-group {
    margin-bottom: 20px;
}

.transform-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transform-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-row label {
    width: 20px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.input-row input[type="number"] {
    flex: 1;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    transition: all 0.2s;
}

.input-row input[type="number"]:focus {
    outline: none;
    border-color: rgba(100, 150, 255, 0.6);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(100, 150, 255, 0.1);
}

.input-row input[type="number"]:hover {
    border-color: rgba(255, 255, 255, 0.2);
}


.transform-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.reset-btn {
    width: 100%;
    padding: 10px;
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    background: rgba(255, 100, 100, 0.3);
    border-color: rgba(255, 100, 100, 0.5);
    color: white;
}

/* ============================================
   右侧Tab按钮栏 + 独立面板系统
   ============================================ */

/* 右侧垂直Tab按钮栏 */
.right-tabs-bar {
    position: fixed;
    right: 5px; /* 贴近边缘 */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px; /* 进一步减少间距 */
    z-index: 998;
}

.vertical-tab-btn {
    width: 40px; /* 进一步减小宽度 */
    min-height: 38px; /* 进一步减小高度 */
    padding: 4px 3px; /* 进一步减小内边距 */
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px; /* 进一步减小圆角 */
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.vertical-tab-btn:hover {
    background: rgba(30, 30, 50, 0.98);
    border-color: rgba(100, 150, 255, 0.5);
    color: white;
    transform: translateX(-3px);
    box-shadow: 0 3px 10px rgba(100, 150, 255, 0.3);
}

.vertical-tab-btn.active {
    background: rgba(100, 150, 255, 0.3);
    border-color: rgba(100, 150, 255, 0.8);
    color: white;
    box-shadow: 0 0 10px rgba(100, 150, 255, 0.4);
}

.vertical-tab-btn .tab-icon {
    display: none; /* 隐藏图标 */
}

.vertical-tab-btn .tab-label {
    font-size: 10px; /* 减小字体 */
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    word-break: keep-all;
}

/* 统一的右侧面板样式 */
.right-panel {
    position: fixed;
    right: 50px; /* 调整为按钮栏宽40px + 间距10px */
    top: 50%;
    transform: translateY(-50%);
    width: 450px; /* 从 400px 增加到 450px，提供更多空间 */
    height: 600px;
    background: rgba(20, 20, 30, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: -1; /* 隐藏时放到底层 */
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideInFromRight 0.3s ease-out;
    min-width: 300px;
    min-height: 400px;
    max-width: 800px;
    max-height: 90vh;
    pointer-events: none; /* ✅ 隐藏时禁止点击 */
    visibility: hidden; /* 确保完全隐藏 */
}

.right-panel.show {
    display: flex;
    pointer-events: auto; /* ✅ 显示时恢复点击 */
    visibility: visible; /* 显示时可见 */
    z-index: 999; /* 显示时提升到上层 */
}

/* 确保面板内所有元素在面板隐藏时也不可点击 */
.right-panel:not(.show) * {
    pointer-events: none !important;
    visibility: hidden !important;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* 面板头部 */
.right-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px; /* 减小padding让标题栏更紧凑 */
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.right-panel .panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.right-panel .panel-icon {
    font-size: 20px;
    line-height: 1;
}

.right-panel .panel-title-text {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.right-panel .panel-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 🎯 标题栏下载按钮 */
.header-download-btn {
    width: 28px;
    height: 28px;
    background: rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 6px;
    color: rgba(33, 150, 243, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.header-download-btn:hover {
    background: rgba(33, 150, 243, 0.25);
    border-color: rgba(33, 150, 243, 0.5);
    color: rgba(33, 150, 243, 1);
    transform: scale(1.05);
}

.header-download-btn.downloading {
    background: rgba(244, 67, 54, 0.15);
    border-color: rgba(244, 67, 54, 0.3);
    color: rgba(244, 67, 54, 0.9);
    animation: pulse 1.5s ease-in-out infinite;
}

.header-download-btn.downloading:hover {
    background: rgba(244, 67, 54, 0.25);
    border-color: rgba(244, 67, 54, 0.5);
    color: rgba(244, 67, 54, 1);
}

/* 面板关闭按钮 */
.panel-close-btn {
    width: 28px;
    height: 28px;
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 6px;
    color: rgba(255, 100, 100, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.panel-close-btn:hover {
    background: rgba(255, 100, 100, 0.3);
    border-color: rgba(255, 100, 100, 0.6);
    color: white;
    transform: rotate(90deg);
}

/* 面板内容区 */
.right-panel .panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    padding: 0; /* 移除默认padding，让tab紧贴标题栏 */
}

/* 模型库Tab按钮区域 */
.right-panel .panel-tabs {
    padding: 3px 6px;
    gap: 3px;
    flex-shrink: 0;
}

.right-panel .tab-btn {
    padding: 4px 8px;
    font-size: 20px;
    gap: 4px;
    border-radius: 3px;
}

.right-panel .tab-count {
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 8px;
    border-radius: 7px;
}

/* 模型库列表区域 */
.right-panel .panel-body {
    padding: 6px 6px 10px 6px; /* 顶部padding减小，让列表靠近tab */
    overflow-x: hidden; /* 禁止横向滚动 */
}

.right-panel .panel-content-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    min-height: 0;
}

.right-panel .panel-content-body::-webkit-scrollbar {
    width: 6px;
}

.right-panel .panel-content-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.right-panel .panel-content-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.right-panel .panel-content-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Transform面板特定样式 */
.transform-node-info {
    padding: 12px 16px;
    background: rgba(100, 150, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.transform-node-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(100, 150, 255, 0.9);
}

/* 拖拽调整尺寸手柄 */
.resize-handle {
    position: absolute;
    background: transparent;
    z-index: 10;
}

.resize-left {
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
}

.resize-left:hover {
    background: rgba(100, 150, 255, 0.3);
}

.resize-bottom {
    left: 0;
    bottom: 0;
    width: 100%;
    height: 6px;
    cursor: ns-resize;
}

.resize-bottom:hover {
    background: rgba(100, 150, 255, 0.3);
}

.resize-corner {
    left: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    cursor: nesw-resize;
    background: rgba(100, 150, 255, 0.2);
    border-radius: 0 12px 0 0;
}

.resize-corner:hover {
    background: rgba(100, 150, 255, 0.5);
}

/* ===============================================
   标签编辑器样式
   =============================================== */

.tags-editor {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px;
    min-height: 80px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    min-height: 32px;
    padding: 4px;
}

.tags-empty-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    font-style: italic;
    padding: 4px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.3) 0%, rgba(74, 158, 255, 0.2) 100%);
    border: 1px solid rgba(74, 158, 255, 0.4);
    border-radius: 4px;
    padding: 4px 8px;
    gap: 6px;
    transition: all 0.2s ease;
    animation: tagFadeIn 0.2s ease-out;
}

@keyframes tagFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tag-item:hover {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.4) 0%, rgba(74, 158, 255, 0.3) 100%);
    border-color: rgba(74, 158, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.2);
}

.tag-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
    user-select: none;
}

.tag-remove-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    width: 18px;
    height: 18px;
    padding: 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tag-remove-btn:hover {
    background: rgba(255, 107, 107, 0.8);
    border-color: rgba(255, 107, 107, 1);
    color: white;
    transform: scale(1.1);
}

.tags-input-row {
    display: flex;
    gap: 6px;
}

.tags-input {
    flex: 1;
    height: 32px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    transition: all 0.2s ease;
}

.tags-input:focus {
    outline: none;
    border-color: rgba(74, 158, 255, 0.6);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.1);
}

.tags-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.add-tag-btn {
    height: 32px;
    padding: 0 16px;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.3) 0%, rgba(74, 158, 255, 0.2) 100%);
    border: 1px solid rgba(74, 158, 255, 0.4);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.add-tag-btn:hover {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.4) 0%, rgba(74, 158, 255, 0.3) 100%);
    border-color: rgba(74, 158, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
}

.add-tag-btn:active {
    transform: translateY(0);
}

 
 / *   = = =   �s�XT a b u�7h_  = = =   * / 
 . e n v i r o n m e n t - c o n t a i n e r   { 
         d i s p l a y :   f l e x ; 
         f l e x - d i r e c t i o n :   c o l u m n ; 
         g a p :   1 2 p x ; 
         p a d d i n g :   0 ; 
 } 
 
 . e n v - s e c t i o n   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 3 ) ; 
         b o r d e r - r a d i u s :   6 p x ; 
         o v e r f l o w :   h i d d e n ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ; 
 } 
 
 . e n v - s e c t i o n - h e a d e r   { 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         g a p :   8 p x ; 
         p a d d i n g :   1 2 p x   1 4 p x ; 
         c u r s o r :   p o i n t e r ; 
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 2 ) ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ; 
         u s e r - s e l e c t :   n o n e ; 
 } 
 
 . e n v - s e c t i o n - h e a d e r : h o v e r   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 } 
 
 . e n v - i c o n   { 
         f o n t - s i z e :   1 8 p x ; 
         f l e x - s h r i n k :   0 ; 
 } 
 
 . e n v - t i t l e   { 
         f l e x :   1 ; 
         f o n t - w e i g h t :   5 0 0 ; 
         f o n t - s i z e :   1 3 p x ; 
         c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 9 ) ; 
 } 
 
 . e n v - s e c t i o n - b o d y   { 
         d i s p l a y :   f l e x ; 
         f l e x - d i r e c t i o n :   c o l u m n ; 
         g a p :   1 2 p x ; 
         p a d d i n g :   1 4 p x ; 
         b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 1 5 ) ; 
 } 
 
 . e n v - i t e m   { 
         d i s p l a y :   f l e x ; 
         f l e x - d i r e c t i o n :   c o l u m n ; 
         g a p :   8 p x ; 
 } 
 
 . e n v - i t e m   l a b e l   { 
         f o n t - s i z e :   1 2 p x ; 
         c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 6 5 ) ; 
         f o n t - w e i g h t :   5 0 0 ; 
 } 
 
 . e n v - m o d e l - i n f o   { 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
         g a p :   1 0 p x ; 
         p a d d i n g :   1 0 p x   1 2 p x ; 
         b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 2 ) ; 
         b o r d e r - r a d i u s :   4 p x ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ; 
 } 
 
 . e n v - m o d e l - n a m e   { 
         f l e x :   1 ; 
         f o n t - s i z e :   1 3 p x ; 
         c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 8 5 ) ; 
         o v e r f l o w :   h i d d e n ; 
         t e x t - o v e r f l o w :   e l l i p s i s ; 
         w h i t e - s p a c e :   n o w r a p ; 
 } 
 
 . e n v - b t n   { 
         p a d d i n g :   8 p x   1 6 p x ; 
         b a c k g r o u n d :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 2 ) ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 4 ) ; 
         b o r d e r - r a d i u s :   4 p x ; 
         c o l o r :   r g b ( 1 4 7 ,   1 9 7 ,   2 5 3 ) ; 
         c u r s o r :   p o i n t e r ; 
         f o n t - s i z e :   1 2 p x ; 
         f o n t - w e i g h t :   5 0 0 ; 
         t r a n s i t i o n :   a l l   0 . 2 s ; 
 } 
 
 . e n v - b t n : h o v e r   { 
         b a c k g r o u n d :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 3 ) ; 
         b o r d e r - c o l o r :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 6 ) ; 
 } 
 
 . e n v - b t n - s m a l l   { 
         p a d d i n g :   4 p x   1 0 p x ; 
         b a c k g r o u n d :   r g b a ( 2 3 9 ,   6 8 ,   6 8 ,   0 . 2 ) ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 2 3 9 ,   6 8 ,   6 8 ,   0 . 4 ) ; 
         b o r d e r - r a d i u s :   3 p x ; 
         c o l o r :   r g b ( 2 5 2 ,   1 6 5 ,   1 6 5 ) ; 
         c u r s o r :   p o i n t e r ; 
         f o n t - s i z e :   1 1 p x ; 
         t r a n s i t i o n :   a l l   0 . 2 s ; 
 } 
 
 . e n v - b t n - s m a l l : h o v e r   { 
         b a c k g r o u n d :   r g b a ( 2 3 9 ,   6 8 ,   6 8 ,   0 . 3 ) ; 
         b o r d e r - c o l o r :   r g b a ( 2 3 9 ,   6 8 ,   6 8 ,   0 . 6 ) ; 
 } 
 
 . e n v - b t n - p r i m a r y   { 
         b a c k g r o u n d :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 3 ) ; 
         b o r d e r - c o l o r :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 5 ) ; 
         c o l o r :   r g b ( 1 9 1 ,   2 1 9 ,   2 5 4 ) ; 
 } 
 
 . e n v - b t n - p r i m a r y : h o v e r   { 
         b a c k g r o u n d :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 4 ) ; 
         b o r d e r - c o l o r :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 7 ) ; 
 } 
 
 . e n v - b t n - s e c o n d a r y   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
         b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 5 ) ; 
         c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 7 ) ; 
 } 
 
 . e n v - b t n - s e c o n d a r y : h o v e r   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ; 
         b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 2 5 ) ; 
 } 
 
 . e n v - t r a n s f o r m - r o w   { 
         d i s p l a y :   f l e x ; 
         g a p :   8 p x ; 
 } 
 
 . e n v - i n p u t - s m a l l   { 
         f l e x :   1 ; 
         p a d d i n g :   6 p x   1 0 p x ; 
         b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 3 ) ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 ) ; 
         b o r d e r - r a d i u s :   4 p x ; 
         c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 9 ) ; 
         f o n t - s i z e :   1 2 p x ; 
 } 
 
 . e n v - i n p u t - s m a l l : f o c u s   { 
         o u t l i n e :   n o n e ; 
         b o r d e r - c o l o r :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 5 ) ; 
         b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 4 ) ; 
 } 
 
 . e n v - c h e c k b o x   { 
         w i d t h :   1 6 p x ; 
         h e i g h t :   1 6 p x ; 
         c u r s o r :   p o i n t e r ; 
 } 
 
 . e n v - c o l o r   { 
         w i d t h :   6 0 p x ; 
         h e i g h t :   3 2 p x ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 2 ) ; 
         b o r d e r - r a d i u s :   4 p x ; 
         c u r s o r :   p o i n t e r ; 
         b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 3 ) ; 
 } 
 
 . e n v - s e l e c t   { 
         p a d d i n g :   6 p x   1 0 p x ; 
         b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 3 ) ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 5 ) ; 
         b o r d e r - r a d i u s :   4 p x ; 
         c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 9 ) ; 
         f o n t - s i z e :   1 2 p x ; 
         c u r s o r :   p o i n t e r ; 
 } 
 
 . e n v - s e l e c t : f o c u s   { 
         o u t l i n e :   n o n e ; 
         b o r d e r - c o l o r :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 5 ) ; 
 } 
 
 . e n v - s l i d e r - c o n t a i n e r   { 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         g a p :   1 0 p x ; 
 } 
 
 . e n v - s l i d e r   { 
         f l e x :   1 ; 
         h e i g h t :   4 p x ; 
         b o r d e r - r a d i u s :   2 p x ; 
         o u t l i n e :   n o n e ; 
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 ) ; 
         a p p e a r a n c e :   n o n e ; 
 } 
 
 . e n v - s l i d e r : : - w e b k i t - s l i d e r - t h u m b   { 
         a p p e a r a n c e :   n o n e ; 
         w i d t h :   1 4 p x ; 
         h e i g h t :   1 4 p x ; 
         b o r d e r - r a d i u s :   5 0 % ; 
         b a c k g r o u n d :   r g b ( 5 9 ,   1 3 0 ,   2 4 6 ) ; 
         c u r s o r :   p o i n t e r ; 
         t r a n s i t i o n :   a l l   0 . 2 s ; 
 } 
 
 . e n v - s l i d e r : : - w e b k i t - s l i d e r - t h u m b : h o v e r   { 
         b a c k g r o u n d :   r g b ( 9 6 ,   1 6 5 ,   2 5 0 ) ; 
         t r a n s f o r m :   s c a l e ( 1 . 1 ) ; 
 } 
 
 . e n v - v a l u e   { 
         m i n - w i d t h :   3 6 p x ; 
         t e x t - a l i g n :   r i g h t ; 
         f o n t - s i z e :   1 2 p x ; 
         c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 7 ) ; 
         f o n t - w e i g h t :   5 0 0 ; 
 } 
 
 . e n v - t e x t u r e - n a m e   { 
         f o n t - s i z e :   1 2 p x ; 
         c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 6 ) ; 
         f o n t - s t y l e :   i t a l i c ; 
 } 
 
 . e n v - a c t i o n s   { 
         d i s p l a y :   f l e x ; 
         g a p :   1 0 p x ; 
         p a d d i n g :   1 2 p x   0   0   0 ; 
 } 
 
 . e n v - a c t i o n s   . e n v - b t n   { 
         f l e x :   1 ; 
 } 
 
 
 
 / *   �s�X!j�W
N O�c:y  * / 
 . e n v - u p l o a d i n g - m e s s a g e   { 
         p o s i t i o n :   f i x e d ; 
         t o p :   2 0 p x ; 
         r i g h t :   2 0 p x ; 
         p a d d i n g :   1 2 p x   2 0 p x ; 
         b a c k g r o u n d :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 9 ) ; 
         c o l o r :   w h i t e ; 
         b o r d e r - r a d i u s :   6 p x ; 
         b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 3 ) ; 
         z - i n d e x :   1 0 0 0 0 ; 
         a n i m a t i o n :   s l i d e I n R i g h t   0 . 3 s   e a s e - o u t ; 
 } 
 
 @ k e y f r a m e s   s l i d e I n R i g h t   { 
         f r o m   { 
                 t r a n s f o r m :   t r a n s l a t e X ( 1 0 0 % ) ; 
                 o p a c i t y :   0 ; 
         } 
         t o   { 
                 t r a n s f o r m :   t r a n s l a t e X ( 0 ) ; 
                 o p a c i t y :   1 ; 
         } 
 } 
 
 . e n v - t e x t u r e - i n f o   { 
         d i s p l a y :   f l e x ; 
         f l e x - d i r e c t i o n :   c o l u m n ; 
         g a p :   8 p x ; 
 } 
 
 
/* ============================================
   环境模型面板样式增强
   ============================================ */

/* 环境模型上传提示 */
.env-uploading-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 环境模型 XYZ 输入布局 */
.env-property-row {
    margin-bottom: 10px;
}

.env-property-label {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
    font-weight: 500;
}

.env-xyz-row {
    display: flex;
    gap: 3px;
    align-items: center;
}

.env-xyz-input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    padding: 2px 4px;
    transition: all 0.2s ease;
}

.env-xyz-input:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.5);
}

.env-xyz-input:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.env-axis-label {
    font-size: 10px;
    font-weight: 600;
    min-width: 10px;
    text-align: center;
    flex-shrink: 0;
}

.env-axis-label.x-axis {
    color: #ef4444;
}

.env-axis-label.y-axis {
    color: #10b981;
}

.env-axis-label.z-axis {
    color: #3b82f6;
}

.env-xyz-input input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 11px;
    padding: 3px 1px;
    outline: none;
    min-width: 0;
}

.env-xyz-input input::-webkit-inner-spin-button,
.env-xyz-input input::-webkit-outer-spin-button {
    opacity: 0.5;
}

/* 环境模型缩放控制 */
.env-scale-control {
    display: flex;
    gap: 6px;
    align-items: center;
}

.env-scale-control input[type="range"] {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.env-scale-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.env-scale-control input[type="range"]::-webkit-slider-thumb:hover {
    background: #60a5fa;
    transform: scale(1.1);
}

.env-scale-control input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #3b82f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.env-scale-control input[type="range"]::-moz-range-thumb:hover {
    background: #60a5fa;
    transform: scale(1.1);
}

.env-scale-control input[type="number"] {
    width: 50px;
    padding: 3px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    color: #fff;
    font-size: 11px;
    text-align: center;
    transition: all 0.2s ease;
}

.env-scale-control input[type="number"]:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.5);
}

.env-scale-control input[type="number"]:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(59, 130, 246, 0.8);
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* 按钮样式增强 */
.env-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.env-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.env-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border: none !important;
}

.env-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: translateY(-1px);
}

/* 模型信息区域美化 */
.env-model-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    min-height: 32px;
}

.env-model-name {
    flex: 1;
    font-size: 11px;
    color: #a0a0a0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.env-model-info:has(.env-model-name:not(:empty)) {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.env-model-info:has(.env-model-name:not(:empty)) .env-model-name {
    color: #60a5fa;
    font-weight: 500;
}

.env-texture-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.env-texture-name {
    font-size: 11px;
    color: #a0a0a0;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===============================================
   ???Tab????
   =============================================== */

.model-library-tabs {
    display: flex;
    gap: 0;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.model-library-tabs .tab-btn {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.model-library-tabs .tab-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.model-library-tabs .tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* ===============================================
   ??????Tab????
   =============================================== */

.model-manage-tabs {
    display: flex;
    gap: 0;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.model-manage-tabs .tab-btn {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.model-manage-tabs .tab-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.model-manage-tabs .tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.manage-tab-panel {
    display: none;
}

.manage-tab-panel.active {
    display: block;
}
